This invention relates to resampling of images.
Images are typically represented in digital form as raster images in which a rectangular grid of pixels values define the image. These pixel values can be thought of as samples of a continuous two-dimensional image at the coordinates of the pixels in the rectangular grid. Changing the array of pixel locations, or scaling the image while keeping the pixel locations fixed, involves computing new pixel values. This process of computing the new pixel values is referred to as resampling the image.
In general, resampling an image with an increased number of pixels involves interpolating image values at locations between the original pixel locations. Similarly, scaling up (magnification of) the image for a fixed grid of pixel locations involves interpolating image values. On the other hand, sampling an image with fewer pixels involves a loss of spatial resolution that is generally handled by spatially low-pass filtering (anti-alias filtering) the image prior to or in the process of determining the new pixel values. Both interpolation and low-pass filtering can be implemented by computing a filtered version of the originally spatially sampled image at the new desired pixel locations.
One technique for increasing the efficiency of the resampling process is to pre-compute a spatially quantized (“binned”) representation of the interpolation/low-pass filter. For example, a fixed number of bins per unit pixel spacing are used. Computing a new pixel value then involves using the appropriate bins when combining the filter and the original pixel values.
In some software applications, a user has control over the type of filter that is used in the resampling. For example, in some applications, the user can choose between a “linear” and a “cubic” filter. The choice has implications for the resulting image quality as well as the computation required to perform the resampling.